﻿@model RiderShop.Mobile.Modle.MyAccount.BalanceModel

@section header
{
    <link rel="stylesheet" href="~/Themes/RongJi/Style/base/css/sign.css">
}
@section title
{
    添加鲜享卡
}
@section pagetitle
{
    添加鲜享卡
}
<div class="top"><img src="/Themes/RongJi/Style/base/imgs/card.jpg" alt=""></div>
<form action="~/Myaccount/AddPaymentCard" method="POST" id="submitForm">
    <div class="body">
        <input type="text" id="card" class="form-control" name="card" placeholder="请输入卡号" autocomplete="off">
        <input type="password" id="password" class="form-control" name="password" placeholder="请输入密码" autocomplete="off">

        @if (!string.IsNullOrEmpty(Model.ErrorMessage))
        {
            <span class="err_msg">@Model.ErrorMessage</span>
        }
        else
        {
            <span class="err_msg" id="msgError"></span>
        }
    </div>
    <div class="bottom">
        <img src="~/Themes/RongJi/Style/base/imgs/ss.jpg" alt="">
        <div class="btn-group btn-group-justified btn-wrapper" role="group" aria-label="...">
            <div class="btn-group" role="group">
                <input class="btn btn-green" type="button" data-role="button" id="btnSubmit" value="提交">
            </div>
            <div class="btn-group" role="group">
                <button type="button" class="btn" onclick="window.history.go(-1);">取消</button>
            </div>
        </div>
    </div>
</form>
@section footer
{
    @*@if (Model.Result != null && !Model.Result.Status)
        {
            <script type="text/javascript">
                $('div').on('pageshow', function (event, ui) {
                    KevinShop.MessageBox.Alert("@Model.Result.ErrorMessage");
                });
            </script>
        }*@

    <script type="text/javascript">
        $("#btnSubmit").click(function () {
            //if ($("#UserName").val() == "") {
            //    KevinShop.MessageBox.Alert("请输入用户名!");
            //    return false;
            //}
            //else
            if ($("#card").val() == "") {
                KevinShop.MessageBox.Alert("请输入卡号!");
                return false;
            }
            else if ($("#PassWord").val() == "") {
                KevinShop.MessageBox.Alert("请输入密码!");
                return false;
            }
            document.forms["submitForm"].submit();

        });


        //让toolbar选中
        var $homeImg = $("#homeImg");
        var $categoryImg = $("#categoryImg");
        var $myaccountImg = $("#myaccountImg");
        var $searchImg = $("#searchImg");

        $homeImg.attr("src", "/Themes/RongJi/Style/base/imgs/f10.png");
        $categoryImg.attr("src", "/Themes/RongJi/Style/base/imgs/f2.png");
        $myaccountImg.attr("src", "/Themes/RongJi/Style/base/imgs/f3_c.png");
        $searchImg.attr("src", "/Themes/RongJi/Style/base/imgs/f4.png");
    </script>
}
